#!/bin/bash
#
# openQRM Enterprise developed by openQRM Enterprise GmbH.
#
# All source code and content (c) Copyright 2014, openQRM Enterprise GmbH unless specifically noted otherwise.
#
# This source code is released under the GNU General Public License version 2, unless otherwise agreed with openQRM Enterprise GmbH.
# The latest version of this license can be found here: src/doc/LICENSE.txt
#
# By using this software, you acknowledge having read this license and agree to be bound thereby.
#
#           http://openqrm-enterprise.com
#
# Copyright 2014, openQRM Enterprise GmbH <info@openqrm-enterprise.com>
#


export OPENQRM_SERVER_BASE_DIR=`dirname $0`
export OPENQRM_SOURCE_DIR=$OPENQRM_SERVER_BASE_DIR
. include/openqrm-functions
. include/openqrm-build-functions

for COMPONENT_CONFIG in `find etc/build.conf/ -type f -name *.conf | grep -v initrd-devices` ; do
	COMPONENT=`basename $COMPONENT_CONFIG`
	COMPONENT=`echo $COMPONENT | sed -e 's/\.conf//g'`
	echo "Checking $COMPONENT"
	openqrm_cache_or_download $COMPONENT $COMPONENT_CONFIG
done
for COMPONENT_CONFIG in $PLUGIN_CONFS; do
	COMPONENT=`basename $COMPONENT_CONFIG`
	COMPONENT=`echo $COMPONENT | sed -e 's/\.conf//g'`
	echo "Checking $COMPONENT"
	openqrm_cache_or_download $COMPONENT $COMPONENT_CONFIG
done

